home *** CD-ROM | disk | FTP | other *** search
- <HTMLtool>A combobox with various links</HTMLtool>
-
- <!-- ONE STEP TO INSTALL DYNAMIC LINKS:
-
- 1. Copy the coding into the BODY of your HTML document -->
-
- <!-- STEP ONE: Paste this code into the BODY of your HTML document -->
-
- <center>
- <form name="addresses">
- do you want to ... <select name="list" onChange="update()">
- <option value="mailto:admin@some-site.com">email admin@some-site.com
- <option value="mailto:support@some-site.com">email support@some-site.com
- <option value="http://www.netscape.com">go to www.netscape.com
- </select>
- <a href="updatelink">do it!</a>
- </form>
- </center>
-
- <script language="javascript">
-
- <!-- begin
- pos = 9999;
- for(num=0;num<document.links.length;num++) {
- if (document.links[num].href.indexOf("updatelink") != -1) {
- pos = num;
- num = 5000;
- }
- }
- function update() {
- if (pos!=9999) {
- sel = document.addresses.list.selectedIndex;
- document.links[pos].href = document.addresses.list[sel].value;
- }
- }
- update();
- // end -->
- </script>